package com.java3_1;

public class MyThread1 implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i <= 10; i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.print(i + " ");
        }
        System.out.println("   " + Thread.currentThread().getName() + "已经完成任务");
    }
}
